package cn.jiyun.mapper;

import cn.jiyun.pojo.Developer;
import cn.jiyun.pojo.Project;
import org.apache.ibatis.annotations.*;

import java.util.List;
import java.util.Map;

public interface DeveloperMapper {

    @Select("select * from developer")
    List<Developer> init();

    List<Map> findPage(@Param("currentPage") int currentPage, @Param("pageSize") Integer pageSize, @Param("queryString") String queryString);

    @Update("update developer set state=0 where did=#{did}")
    void delete(String did);

    @Select("select * from developer where pid=#{pid}")
    List<Developer> findById(String pid);

    @Update("update developer set dname=#{dname},updatetime=#{updatetime} where did=#{did}")
    int edit(Developer developer);

    @Insert("INSERT INTO `aniu_kaifa`.`developer` (`did`,  `dname`, `updatetime`) VALUES (#{did},#{dname},#{updatetime})")
    int add(Developer developer);

    @Select("select count(1) from developer where state=1")
    long jilu();



}
